﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JAMR.Rendering
{
    public class BlockTexture
    {
        public string TextureTop { get; set; }
        public string TextureBottom { get; set; }
        public string TextureLeft { get; set; }
        public string TextureRight { get; set; }
        public string TextureBack { get; set; }
        public string TextureFront { get; set; }

        public int ITextureTop { get { return TextureCache.Instance[TextureTop]; } }
        public int ITextureBottom { get { return TextureCache.Instance[TextureBottom]; } }
        public int ITextureLeft { get { return TextureCache.Instance[TextureLeft]; } }
        public int ITextureRight { get { return TextureCache.Instance[TextureRight]; } }
        public int ITextureBack { get { return TextureCache.Instance[TextureBack]; } }
        public int ITextureFront { get { return TextureCache.Instance[TextureFront]; } }

        public void SetAll(string texture)
        {
            SetTopBottom(texture);
            SetAllSides(texture);
        }
        public void SetTopBottom(string texture)
        {
            this.TextureTop = texture;
            this.TextureBottom = texture;
        }
        public void SetAllSides(string texture)
        {
            this.TextureBack = texture;
            this.TextureLeft = texture;
            this.TextureFront = texture;
            this.TextureRight = texture;
        }
    }
}
